import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { resolve } from "path";
const pathResolve = (dir: string): string => {
	return resolve(__dirname, ".", dir);
};
export default defineConfig(({ mode }) => {
	return {
		plugins: [vue()],
		base: mode === "production" ? "/screen" : "",
		resolve: {
			alias: {
				"@": pathResolve("src"),
			},
		},
		server: {
			port: 3006,
			proxy: {
				'/api': 'http://127.0.0.1:8000/',
			  },
		},
	};
});
